/**
 * 数据库获取数据测试
 * @author renyu
 */

import { ReceiverHelper } from '../receive/receiverhelper';
import * as fs from 'fs';

ReceiverHelper.instance.setOptions({
	mongoconnstring: 'mongodb://admin:admin@localhost:27017/mapserver'
});


let filepath = 'E:\\slice\\x.rar';
let outstream = fs.createWriteStream(filepath);
let instream = ReceiverHelper.instance.receiver.getStream('4bf8932bd15cca0398ff6bf51c76e5f8b606d31acd4b6551f92bdf6098ce290c');
instream.on('end', () => {
	console.log('end');
});
instream.pipe(outstream);

